#include "QApp.h"
#include <QFileInfo>
QSettings* QApp::config = nullptr;
QApp::QApp(int argc, char* argv[])
	:QApplication(argc, argv)
{
	bool isExists = true;
	QFileInfo fileInfo("config.ini");
	if (!fileInfo.exists())
		isExists = false;
	if(!config)
		config = new QSettings("config.ini", QSettings::IniFormat);
	if (!isExists)
		config->setValue("Host/host", "127.0.0.1:1234");
}

QSettings* QApp::configs()
{
	return config;
}
